package com.zsl.cn;

public class AppInfoProxy implements com.zsl.cn.AppInfo {
  private String _endpoint = null;
  private com.zsl.cn.AppInfo appInfo = null;
  
  public AppInfoProxy() {
    _initAppInfoProxy();
  }
  
  public AppInfoProxy(String endpoint) {
    _endpoint = endpoint;
    _initAppInfoProxy();
  }
  
  private void _initAppInfoProxy() {
    try {
      appInfo = (new com.zsl.cn.AppInfoServiceLocator()).getAppInfo();
      if (appInfo != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)appInfo)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)appInfo)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (appInfo != null)
      ((javax.xml.rpc.Stub)appInfo)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.zsl.cn.AppInfo getAppInfo() {
    if (appInfo == null)
      _initAppInfoProxy();
    return appInfo;
  }
  
  public com.zsl.cn.AppResultInfo obtainAppInfo(java.lang.String appAddress, java.lang.String iconAddress) throws java.rmi.RemoteException{
    if (appInfo == null)
      _initAppInfoProxy();
    return appInfo.obtainAppInfo(appAddress, iconAddress);
  }
  
  
}